import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)


let store = new Vuex.Store({
    state: {
        // 相当于vue中的data
        num: 1000,
        permission:{
            gcxm_HSE_ConstructionRegist_del:true
        }
    },
    getters:{
        storeNum : state => state.num ,
        permission: state => state.permission
    },
    mutations:{
        SET_PERMISSION:(state, status)=>{
            console.log("state:",state) ;
            console.log("status:",status) ;
            state.permission['gcxm_HSE_ConstructionRegist_del'] = status
        }

    }
})

// 遵循common.js规范
export default store;
